home *** CD-ROM | disk | FTP | other *** search
- // Figure 7 for "A Little CAD with C++"
- // Copyright 1988 Bruce Eckel
- // Permission required to distribute source
-
- // file: square.hpp
- #ifndef SQUARE_HPP
- #define SQUARE_HPP
- #include <fg.h>
- #include "cadshape.hpp"
-
- class square : public cadshape {
- fg_box_t small_box;
- public:
- void draw();
- square(unsigned x, unsigned y) : () {
- x_center = x; y_center = y;
- draw();
- }
- void erase();
- ~square() { erase(); }
- };
- #endif SQUARE_HPP
-